<?php

namespace app\validate;

use think\Validate;

class CommonExample extends Validate
{
    public function __construct()
    {
        parent::__construct();

        $ruleData = $this->rule;
        foreach ($ruleData as $key => $value) {
            if (!array_key_exists($key, $this->fieldDescRel)) {
                continue;
            }
            $this->rule[$key . '|' . $this->fieldDescRel[$key]] = $value;
            unset($this->rule[$key]);
        }
    }

    /**
     * 字段描述
     */
    protected $fieldDescRel = [

    ];

    /**
     * 验证规则定义
     */
    protected $rule = [

    ];

    /**
     * 场景
     */
    protected $scene = [

    ];

    /**
     * 对特定的规则错误消息描述
     */
    protected $message = [

    ];

}